package com.axs.logcollector.jira;

import com.atlassian.jira.rest.client.api.domain.BasicIssueType;
import com.atlassian.jira.rest.client.api.domain.BasicPriority;
import com.atlassian.jira.rest.client.api.domain.BasicStatus;

public class Ticket {
	private String ticketId;
	private String summary;
	private BasicIssueType issueType;
	private BasicStatus status; // Open, Fixed, ...  
	private BasicPriority priority; // Critical, Major, ... 
	private String reporter; 
	private String testAssignee;
	private String assignee;
	
	public Ticket() {
	}

	public String getTicketId() {
		return ticketId;
	}

	public void setTicketId(String ticketId) {
		this.ticketId = ticketId;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public BasicStatus getStatus() {
		return status;
	}

	public void setStatus(BasicStatus status) {
		this.status = status;
	}

	public BasicPriority getPriority() {
		return priority;
	}

	public void setPriority(BasicPriority priority) {
		this.priority = priority;
	}

	public String getReporter() {
		return reporter;
	}

	public void setReporter(String reporter) {
		this.reporter = reporter;
	}

	public String getTestAssignee() {
		return testAssignee;
	}

	public void setTestAssignee(String testAssignee) {
		this.testAssignee = testAssignee;
	}

	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}

	public BasicIssueType getIssueType() {
		return issueType;
	}

	public void setIssueType(BasicIssueType issueType) {
		this.issueType = issueType;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("[");
		builder.append("ticketId = ").append(ticketId);
		builder.append(", issueType = ").append(issueType.getName());
		builder.append(", status = ").append(status.getName());
		builder.append(", priority = ").append(priority.getName());
		builder.append(", reporter = ").append(reporter);
		builder.append(", testAssignee = ").append(testAssignee);
		builder.append(", assignee = ").append(assignee);
		builder.append(", summary = ").append(summary);
		builder.append("]");
		return builder.toString();
	}	
}
